Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ServiceCmd restructuring to repair docker/port-forward issues #13756

Merged
merged 1 commit into from
Mar 9, 2022

Conversation

ckannon
Copy link
Contributor

@ckannon ckannon commented Mar 7, 2022

fixes #13736
fixes #13746
fixes #13075

Before:

ckannon-macbookpro:minikube ckannon$ mk service test-app -n test --url
😿  service test/test-app has no node port
panic: runtime error: index out of range [3] with length 3

goroutine 1 [running]:
k8s.io/minikube/cmd/minikube/cmd.glob..func35(0x7194960, {0xc000e20200, 0x1, 0x4})
        /Users/ckannon/dev/minikube/cmd/minikube/cmd/service.go:138 +0x645
github.com/spf13/cobra.(*Command).execute(0x7194960, {0xc000e201c0, 0x4, 0x4})
        /Users/ckannon/go/pkg/mod/github.com/spf13/cobra@v1.3.0/command.go:860 +0x5f8
github.com/spf13/cobra.(*Command).ExecuteC(0x7194460)
        /Users/ckannon/go/pkg/mod/github.com/spf13/cobra@v1.3.0/command.go:974 +0x3bc
github.com/spf13/cobra.(*Command).Execute(...)
        /Users/ckannon/go/pkg/mod/github.com/spf13/cobra@v1.3.0/command.go:902
k8s.io/minikube/cmd/minikube/cmd.Execute()
        /Users/ckannon/dev/minikube/cmd/minikube/cmd/root.go:157 +0xb9f
main.main()
        /Users/ckannon/dev/minikube/cmd/minikube/main.go:86 +0x255
ckannon-macbookpro:minikube ckannon$ 

After:

ckannon-macbookpro:minikube ckannon$ mk service test-app -n test --url
😿  service test/test-app has no node port
🏃  Starting tunnel for service test-app.
http://127.0.0.1:50772
❗  Because you are using a Docker driver on darwin, the terminal needs to be open to run it.

@k8s-ci-robot k8s-ci-robot added do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Mar 7, 2022
@k8s-ci-robot
Copy link
Contributor

Hi @ckannon. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 7, 2022
@ckannon
Copy link
Contributor Author

ckannon commented Mar 7, 2022

@medyagh can I get an /ok-to-test please?

@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@ckannon ckannon changed the title fixes #13736 - ServiceCmd restructuring to repair docker/port-forward issues ServiceCmd restructuring to repair docker/port-forward issues Mar 7, 2022
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. label Mar 7, 2022
@k8s-ci-robot k8s-ci-robot added the do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. label Mar 7, 2022
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. label Mar 7, 2022
@ckannon ckannon force-pushed the fixes/13746 branch 6 times, most recently from 8811161 to b2e1ebe Compare March 8, 2022 04:46
@medyagh
Copy link
Member

medyagh commented Mar 8, 2022

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 8, 2022
Copy link
Member

@medyagh medyagh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you for this PR, do u mind adding before/after this PR in the PR description

@minikube-pr-bot
Copy link

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 13756) |
+----------------+----------+---------------------+
| minikube start | 53.3s    | 53.2s               |
| enable ingress | 28.9s    | 28.2s               |
+----------------+----------+---------------------+

Times for minikube (PR 13756) start: 52.8s 53.9s 53.0s 55.4s 50.9s
Times for minikube start: 54.6s 55.9s 52.2s 52.3s 51.2s

Times for minikube ingress: 26.0s 30.0s 29.5s 29.1s 30.1s
Times for minikube (PR 13756) ingress: 30.0s 29.0s 26.5s 29.0s 26.6s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 13756) |
+----------------+----------+---------------------+
| minikube start | 26.3s    | 25.9s               |
| enable ingress | 23.6s    | 23.5s               |
+----------------+----------+---------------------+

Times for minikube (PR 13756) start: 26.1s 24.6s 26.3s 25.3s 27.2s
Times for minikube start: 29.8s 25.3s 25.1s 25.5s 25.7s

Times for minikube ingress: 22.9s 25.9s 22.9s 22.9s 23.5s
Times for minikube (PR 13756) ingress: 22.4s 22.4s 22.9s 23.9s 25.9s

docker driver with containerd runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 13756) |
+----------------+----------+---------------------+
| minikube start | 39.8s    | 43.0s               |
| enable ingress | 24.6s    | 21.7s               |
+----------------+----------+---------------------+

Times for minikube start: 30.4s 41.3s 41.9s 44.4s 40.8s
Times for minikube (PR 13756) start: 45.4s 41.4s 41.0s 41.7s 45.6s

Times for minikube ingress: 23.4s 22.9s 33.4s 19.9s 23.4s
Times for minikube (PR 13756) ingress: 18.9s 23.4s 23.4s 23.4s 19.4s

@minikube-pr-bot
Copy link

These are the flake rates of all failed tests.

Environment Failed Tests Flake Rate (%)
Docker_macOS TestFunctional/parallel/ServiceCmd (gopogh) n/a
KVM_Linux TestPause/serial/PauseAgain (gopogh) 0.00 (chart)
Docker_Linux_containerd TestFunctional/parallel/MountCmd/specific-port (gopogh) 1.27 (chart)
Docker_Linux_containerd TestNetworkPlugins/group/custom-weave/Start (gopogh) 18.33 (chart)
Docker_Linux_containerd TestStartStop/group/no-preload/serial/DeployApp (gopogh) 26.96 (chart)
Docker_Linux_containerd TestStartStop/group/no-preload/serial/UserAppExistsAfterStop (gopogh) 26.96 (chart)
Docker_Linux_containerd TestStartStop/group/no-preload/serial/FirstStart (gopogh) 27.59 (chart)
Docker_Linux_containerd TestStartStop/group/no-preload/serial/SecondStart (gopogh) 27.59 (chart)
Docker_Linux_containerd TestNetworkPlugins/group/kindnet/Start (gopogh) 47.01 (chart)
Docker_Linux_containerd TestStartStop/group/default-k8s-different-port/serial/DeployApp (gopogh) 52.17 (chart)
Docker_Linux_containerd TestStartStop/group/default-k8s-different-port/serial/FirstStart (gopogh) 52.59 (chart)
Docker_Linux_containerd TestStartStop/group/default-k8s-different-port/serial/UserAppExistsAfterStop (gopogh) 53.45 (chart)
Docker_Linux_containerd TestStartStop/group/default-k8s-different-port/serial/SecondStart (gopogh) 55.37 (chart)
Docker_macOS TestNetworkPlugins/group/kindnet/DNS (gopogh) 57.41 (chart)
Docker_macOS TestNetworkPlugins/group/calico/Start (gopogh) 62.96 (chart)
Hyper-V_Windows TestNoKubernetes/serial/StartWithK8s (gopogh) 65.28 (chart)
Docker_macOS TestNetworkPlugins/group/kubenet/DNS (gopogh) 66.67 (chart)
Docker_Linux_containerd TestNetworkPlugins/group/enable-default-cni/DNS (gopogh) 73.11 (chart)
Docker_Linux_containerd TestNetworkPlugins/group/bridge/DNS (gopogh) 77.78 (chart)
Docker_Linux_containerd TestNetworkPlugins/group/calico/Start (gopogh) 77.78 (chart)
Docker_macOS TestNetworkPlugins/group/bridge/DNS (gopogh) 78.00 (chart)
Docker_macOS TestNetworkPlugins/group/enable-default-cni/DNS (gopogh) 79.82 (chart)
Docker_macOS TestDownloadOnly/v1.16.0/preload-exists (gopogh) 100.00 (chart)
Hyper-V_Windows TestMultiNode/serial/PingHostFrom2Pods (gopogh) 100.00 (chart)
Hyper-V_Windows TestMultiNode/serial/RestartKeepsNodes (gopogh) 100.00 (chart)

To see the flake rates of all tests by environment, click here.

@ckannon
Copy link
Contributor Author

ckannon commented Mar 9, 2022

Also - fixed tests so that all but one works for docker / port-forwarding drivers.

Before:

ckannon-macbookpro:minikube ckannon$ mk service test-app -n test --url
😿  service test/test-app has no node port
panic: runtime error: index out of range [3] with length 3

goroutine 1 [running]:
k8s.io/minikube/cmd/minikube/cmd.glob..func35(0x7194960, {0xc000e20200, 0x1, 0x4})
        /Users/ckannon/dev/minikube/cmd/minikube/cmd/service.go:138 +0x645
github.com/spf13/cobra.(*Command).execute(0x7194960, {0xc000e201c0, 0x4, 0x4})
        /Users/ckannon/go/pkg/mod/github.com/spf13/cobra@v1.3.0/command.go:860 +0x5f8
github.com/spf13/cobra.(*Command).ExecuteC(0x7194460)
        /Users/ckannon/go/pkg/mod/github.com/spf13/cobra@v1.3.0/command.go:974 +0x3bc
github.com/spf13/cobra.(*Command).Execute(...)
        /Users/ckannon/go/pkg/mod/github.com/spf13/cobra@v1.3.0/command.go:902
k8s.io/minikube/cmd/minikube/cmd.Execute()
        /Users/ckannon/dev/minikube/cmd/minikube/cmd/root.go:157 +0xb9f
main.main()
        /Users/ckannon/dev/minikube/cmd/minikube/main.go:86 +0x255
ckannon-macbookpro:minikube ckannon$ 

After:

ckannon-macbookpro:minikube ckannon$ mk service test-app -n test --url
😿  service test/test-app has no node port
🏃  Starting tunnel for service test-app.
http://127.0.0.1:50772
❗  Because you are using a Docker driver on darwin, the terminal needs to be open to run it.

@minikube-pr-bot
Copy link

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 13756) |
+----------------+----------+---------------------+
| minikube start | 53.3s    | 53.3s               |
| enable ingress | 29.7s    | 29.4s               |
+----------------+----------+---------------------+

Times for minikube start: 53.9s 53.6s 53.2s 53.3s 52.6s
Times for minikube (PR 13756) start: 53.6s 53.3s 53.3s 53.3s 53.0s

Times for minikube ingress: 29.6s 29.6s 29.6s 29.6s 30.1s
Times for minikube (PR 13756) ingress: 26.6s 31.2s 30.6s 29.1s 29.6s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 13756) |
+----------------+----------+---------------------+
| minikube start | 27.3s    | 27.4s               |
| enable ingress | 23.2s    | 22.9s               |
+----------------+----------+---------------------+

Times for minikube (PR 13756) start: 26.5s 26.7s 28.0s 27.6s 28.2s
Times for minikube start: 28.2s 28.1s 27.0s 26.9s 26.4s

Times for minikube ingress: 22.9s 22.9s 23.0s 24.5s 22.9s
Times for minikube (PR 13756) ingress: 23.5s 22.5s 22.9s 23.0s 22.5s

docker driver with containerd runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 13756) |
+----------------+----------+---------------------+
| minikube start | 41.7s    | 44.4s               |
| enable ingress | 21.9s    | 20.8s               |
+----------------+----------+---------------------+

Times for minikube start: 35.6s 42.2s 42.8s 42.5s 45.7s
Times for minikube (PR 13756) start: 42.2s 45.9s 42.2s 45.4s 46.3s

Times for minikube ingress: 19.9s 22.9s 23.4s 23.9s 19.0s
Times for minikube (PR 13756) ingress: 23.0s 19.0s 23.4s 19.9s 19.0s

@minikube-pr-bot
Copy link

These are the flake rates of all failed tests.

Environment Failed Tests Flake Rate (%)
Docker_Windows TestFunctional/parallel/ServiceCmd (gopogh) n/a
Docker_macOS TestNetworkPlugins/group/calico/NetCatPod (gopogh) 0.00 (chart)
Docker_Linux_containerd TestRunningBinaryUpgrade (gopogh) 2.52 (chart)
Docker_Windows TestCertExpiration (gopogh) 8.62 (chart)
Docker_Windows TestStartStop/group/default-k8s-different-port/serial/SecondStart (gopogh) 10.43 (chart)
Docker_Linux_containerd TestStoppedBinaryUpgrade/MinikubeLogs (gopogh) 11.39 (chart)
Docker_Linux_containerd TestStoppedBinaryUpgrade/Upgrade (gopogh) 12.03 (chart)
Docker_Windows TestNoKubernetes/serial/StartWithStopK8s (gopogh) 28.32 (chart)
Docker_Linux_containerd TestStartStop/group/embed-certs/serial/DeployApp (gopogh) 33.33 (chart)
Docker_Linux_containerd TestStartStop/group/embed-certs/serial/FirstStart (gopogh) 33.33 (chart)
Docker_Linux_containerd TestStartStop/group/embed-certs/serial/UserAppExistsAfterStop (gopogh) 34.19 (chart)
Docker_Linux_containerd TestStartStop/group/embed-certs/serial/SecondStart (gopogh) 34.75 (chart)
Docker_Linux_containerd TestStartStop/group/old-k8s-version/serial/DeployApp (gopogh) 35.04 (chart)
Docker_Linux_containerd TestStartStop/group/old-k8s-version/serial/SecondStart (gopogh) 35.04 (chart)
Docker_Linux_containerd TestStartStop/group/old-k8s-version/serial/FirstStart (gopogh) 35.59 (chart)
Docker_Linux_containerd TestStartStop/group/old-k8s-version/serial/UserAppExistsAfterStop (gopogh) 37.19 (chart)
Docker_Linux TestFunctional/serial/ComponentHealth (gopogh) 39.10 (chart)
Docker_Linux TestNetworkPlugins/group/false/DNS (gopogh) 42.95 (chart)
Docker_Linux_containerd TestStartStop/group/default-k8s-different-port/serial/DeployApp (gopogh) 53.85 (chart)
Docker_Linux_containerd TestStartStop/group/default-k8s-different-port/serial/FirstStart (gopogh) 54.24 (chart)
Docker_Linux_containerd TestStartStop/group/default-k8s-different-port/serial/UserAppExistsAfterStop (gopogh) 55.46 (chart)
Docker_Linux_containerd TestStartStop/group/default-k8s-different-port/serial/SecondStart (gopogh) 56.91 (chart)
Hyper-V_Windows TestNoKubernetes/serial/StartWithK8s (gopogh) 63.89 (chart)
Docker_Linux TestNetworkPlugins/group/custom-weave/Start (gopogh) 67.31 (chart)
Docker_Linux TestNetworkPlugins/group/kindnet/DNS (gopogh) 68.92 (chart)
Docker_Linux TestNetworkPlugins/group/calico/Start (gopogh) 70.51 (chart)
Docker_Linux_containerd TestNetworkPlugins/group/calico/Start (gopogh) 76.23 (chart)
Docker_Linux TestNetworkPlugins/group/enable-default-cni/DNS (gopogh) 83.97 (chart)
Docker_Linux TestNetworkPlugins/group/kubenet/DNS (gopogh) 84.62 (chart)
Docker_Windows TestAddons/parallel/MetricsServer (gopogh) 85.34 (chart)
More tests... Continued...

Too many tests failed - See test logs for more details.

To see the flake rates of all tests by environment, click here.

Copy link
Member

@medyagh medyagh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you very much for not only fixing this regress but also added tests so it doesnt happen again!

good work

@medyagh medyagh merged commit 8966840 into kubernetes:master Mar 9, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ckannon, medyagh

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 9, 2022
@dgoldsmith dgoldsmith mentioned this pull request Apr 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
5 participants